home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 0277.ZIP / WTF.DOC < prev    next >
Text File  |  1986-11-12  |  7KB  |  179 lines

  1.  
  2.          Notes on "Where The F***"
  3.          =========================
  4.  
  5. Current Version : V 3.10
  6. Dated        : 07-FEB-1986
  7.  
  8.  
  9. WTF is a file find program, and having found the files offers the oppertunity
  10. to COPY, RENAME and DELEATE the origional.
  11.  
  12. The wilde cards allowed in the filespec for the search ARE NOT DOS.
  13. ie:  ?    : matches ANY charictor but theere MUST be one there
  14.      *    : means Ship zero or more charictors to find the next defined char.
  15.       ( '.' and EOS are considers chars )
  16. AND  there is NO restriction on the number of or ordering of wild cards in the
  17.      defined filespec. The wildcard matching code will search exaustivly for
  18.      a match - see example 2 below.
  19.  
  20. Some examples:
  21.   1 :    ABC*D     Must start with 'ABC' AND end with 'D'
  22.          ABCD        yes
  23.          ABCDD        yes
  24.          ABCxDxyD    yes
  25.          xABCD        no
  26.          ABCDx        no
  27.  
  28.   2 :    AB*C*D     Must start with 'AB' AND must contain 'C' and must end 'D'
  29.          ABCD        yes
  30.          ABxxxCxD    yes
  31.          ABxCxCCD    yes
  32.          ABxCxCCE    no
  33.  
  34.   3 :    *?A     Skip whatever is required to find 'Somthing'A
  35.          (at least 2 chars)
  36.     ?*A     'Somthing' then skip whatever is required to leave A at end.
  37.  
  38. These rules can be modified to return all NON-MATCHING files with the -n switch
  39.  
  40. SWITCHES.
  41. ========
  42. This page of information is output to the VDU if wtf is called with either
  43. no or an invalid set of switch settings.
  44.  
  45. The switches and filespec can be in any order on the command line.
  46.  
  47. The switches are split into two groups those requireing further information
  48. to fully define the switchs function and those with just an ON/OFF action.
  49.  
  50.  
  51.  
  52. Needing further qualifing
  53. =========================
  54. -y        : can be used as is to cause the found files date and time of
  55. -o        : last update to be output. But can also be used to supply a
  56.         : cut off date for the search. Eg.
  57. -y1-2-1984  : Younger than 1 Feb 1985 ( must be four fig year )
  58. -o12-5-1986 : older than.
  59.  
  60. -c....        : copy  the target for the copy must be specified. if strig is
  61.         : blank then target for the copy is the currently active drive
  62.         : path. Else it is the defined drive and path ( both parts
  63.         : optional ) If the path specified does not begin with a path
  64.         : seperator char '\' then the path is assumed to be ADDED on top
  65.         : of the currently active path of the selected drive. If the
  66.         : required path for a copy does not exist then it will be created.
  67.         : See also the -a switch (ON/OFF section). ONLY drive and path are
  68.         : allowed, if no terminating '\' is present on a path one is
  69.         : appended.
  70.  
  71. -k...        : Same as for -c but files are only copied if the destination file
  72.         : does not exist OR the destination file dose exist but is OLDER
  73.         : than the source file found in the search.
  74.  
  75. -r....        : rename If a portion of the renam is absent it is taken from the
  76.         : origional ELSE it comes from the rename string. This can rename
  77.         : files accross path boundaries, but not drives !
  78. -r\xxx\.q   : will move the file to directory \xxx\ and replace the extent with
  79.         : 'q' the filename portion will remaine unchainged, since it is not
  80.         : present in the rename string.
  81.  
  82.  
  83.  
  84. ON/OFF
  85. ======
  86. upbsnhd?a
  87. u        : look on all drives up to drive Y: starting with the one defined
  88.         : in the search string ( or currently active ). If no path is
  89.         : specified in the search string then the currently active path
  90.         : on each drive is the start point.
  91. p        : Use the DOS PATH= string as the drive and path portions of the
  92.         : search string.
  93. b        : causes wtf NOT to ask for permition befoure copying, renameing
  94.         : an deleating.
  95. s        : continus search through all sibling directories
  96. n        : use ony files that DO NOT MATCH
  97. h        : include System and Hidden files in the search. Hidden directories
  98.         : are automaticaly searched.
  99. d        : after finding and optionaly copying delete the origional.
  100. ?        : dont actualy do it but produce the screen output anyway.
  101. a        : APPEND used to modify the target path used in the COPY option.
  102.         : it APPENDS the path of the origional the the path ( if any )
  103.         : specified in the copy string. Thus whole disks can be moved on
  104.         : top of another directory.
  105.  
  106.  
  107. Search filespec.
  108. ================
  109.  
  110.    Must contain AT LEAST ONE and up to three of the following.
  111. 1 : Drive name:  If absent use the currenty active drive.
  112. 2 : Path, \Path  If absent use the currently active path.
  113. 3 : filename;nextone;another;etc; one or more filenames
  114.     ( with or without wildcards ) separated by ';' NO SPACES.
  115.  
  116.  
  117.  
  118. eg.  wtf includes\*.h;*.c;*.asm  -sab -ca:\old_ones\
  119.      is interprited as Starting at
  120.  
  121.        Current Drive:Current_Path\includes\
  122.      (and continueing through all offspring subdirectories)
  123.      Find ALL files    Anything.H   AND
  124.                Anything.C   AND
  125.                Anything.ASM
  126.  
  127.      And then COPY them ( as they are found ) to
  128.        Drive         A:
  129.        Subdirectory  \OLD_ONES\
  130.        Appending the found files path ( from where we started looking ) to
  131.        A:\OLD_ONES\ as we go. Subdirectories will be created as required.
  132.  
  133. If at any time the target path can not be created or the copy did not compleate
  134. then the user will be asked weather to try againe, the disk can be chainged
  135. at this point and the path creation will start over.
  136.  
  137.  
  138.  
  139. General Notes for COPY.
  140. ======================
  141.        For each level in the target copy path causes DOS to read the new
  142.        directory in for EVERY file. So in order to speed things up the
  143.        copy path can start at the currently active path. However the
  144.        destination path as written to the VDU is always the FULL and
  145.        UNIQUE definition. It is possable for the same file to be accessed
  146.        and opened by DOS using diferent formes of it name, different ways
  147.        to define the same path, withput realising that it is in fact dealing
  148.        with the same physical file. WTF checks explicitly for this and will
  149.        never allow a file to be coppied to itsself.
  150.  
  151.  
  152.  
  153. The following page is the programs own help screen.
  154. ==================================================
  155.  
  156. Useage...
  157. wtf [d:][[\]path\][filespec][.][ext] [-upbsanh?d] [-y/o...] [-r..] [-c..]
  158. [d:][[\]path\]<filespec>[.ext][;file;file;...] ARE the SEARCH PATTEN(s)
  159. Wild cards are NOT DOS    eg: A*B*C*?D is allowed !.
  160. WARNING-----  This program Beats as it sweeps as it cleans !!!------
  161. Allowed switches are
  162.   n : NOT    : use NON matching files.
  163.   ? : IDIOT    : Produce all screen output but do nothing.
  164.   s : SIBLING    : Continous search through all offspring.
  165.   p : PATH    : Perform search through the DOS PATH= sequence.
  166.   u : UNIVERSAL : Perform search through ALL DISKS ON LINE from [d:].
  167.   h : HIDDEN    : Search to include SYSTEM and HIDDEN files also.
  168.   a : APPEND    : For copy APPEND found path to defined path.
  169.   b : BATCH    : do NOT ask for permission B4 DEL, COPY or REN.
  170.   d : DELETE    : when done with any of the above DELETE THE ORIGIONAL.
  171.   -c[d:][\path\]<filespec> : copy found files to this destination.
  172.   -k...     : copy files only if dest file older or non existant.
  173.   -r[\path\]<filespec>       : rename --------------!!-------------.
  174.   -oxx:xx:xxxx     only act on files Older than date
  175.   -yxx:xx:xxxx     only act on files Younger than or = date; default = -y1:1:1980
  176.  
  177.  
  178.  
  179.